package com.scu.service;

import com.scu.pojo.Report;
import com.scu.pojo.Topic;
import com.scu.pojo.CollectionTopic;
import com.scu.pojo.User;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface TopicService {

    //查询帖子列表
    List<Topic> getTopicList(Topic topic);

    //分页获取帖子信息
    List<Topic> getTopicListByPage(Topic topic,int page,int limit);

    //分页获取精华帖
    List<Topic> getEliteTopicListByPage(Topic topic,int page,int limit);

    //获取我的帖子
    List<Topic> getMyTopicList(Topic topic);

    //分页获取我的帖子
    List<Topic> getMyTopicListByPage(Topic topic,int page,int limit);

    //获取我的收藏
    List<Topic> getMyCollectionTopicList(Topic topic);

    //分页获取我的收藏
    List<Topic> getMyCollectionTopicListByPage(Topic topic,int page,int limit);
    //保存帖子附带的图像

    void approvalFile(MultipartFile filecontent,String realPath);
    //查询帖子信息以及帖子回复
    List<Topic> getTopicCommentList(Topic topic);

    //查询当前帖子评论数
    int getCommentNum(Topic topic);

    //发帖子
    int postTopic(Topic topic);

    //修改帖子
    int redactTopic(Topic topic);

    //获取返回发布文章数目最多的10名用户
    List<User> getPostMostUser();

    //删除帖子
    int removeTopicById(Topic topic);

    //回复帖子
    int recoverTopicById(Topic topic);

    //置顶帖子
    int setTopTopicById(Topic topic);

    //解除置顶
    int removeTopTopicById(Topic topic);

    //帖子加精
    int setEliteTopicById(Topic topic);

    //取消加精
    int removeEliteTopicById(Topic topic);

    //关闭帖子
    int closeTopicById(Topic topic);

    //打开帖子
    int reopenTopicById(Topic topic);

    //    //举报帖子
    int informTopic(Report report);

    //检查该用户是否收藏该贴
    int checkCollectTopic(CollectionTopic CollectionTopic);

    //收藏帖子
    int collectTopic(CollectionTopic collectionTopic);

    //取消收藏
    int deleteCollectionTopic(CollectionTopic CollectionTopic);


    List<Topic> getTopicByID(int t_id);

    void deleteDir(String dirPath);


}
